From eb0a3ee812d48f1faecbf6258c293e475b4016a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Sun, 24 Oct 2021 10:59:57 +0200 Subject: [PATCH] fw4.uc: Do not quote port ranges MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This fixes the translation of rules like the following: config rule ... option dest_port '67:68' Signed-off-by: Thomas Weißschuh --- root/usr/share/ucode/fw4.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc index f0e180d..c07b355 100644 --- a/root/usr/share/ucode/fw4.uc +++ b/root/usr/share/ucode/fw4.uc @@ -1374,7 +1374,7 @@ return { }, quote: function(s, force) { - if (force === true || !match(s, /^([0-9A-Fa-f:.\/]+)( \. [0-9A-Fa-f:.\/]+)*$/)) + if (force === true || !match(s, /^([0-9A-Fa-f:.\/-]+)( \. [0-9A-Fa-f:.\/-]+)*$/)) return sprintf('"%s"', replace(s + "", /(["\\])/g, '\\$1')); return s; -- 2.30.2